package com.example.demo.api.mq;

import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

/**
 * Created by Administrator on 2018/10/23.
 */
public class Listener implements MessageListener{
    @Override
    public void onMessage(Message message) {
        try {
            System.out.println("收到的消息："+((TextMessage)message).getText());
        } catch (JMSException e) {
            e.printStackTrace();
        }
    }
}
